package vehicle_maintain_enum

import "gitee.com/lailonghui/vehicle-supervision-framework/pkg/dicts"

// 车辆维护-提交客服重新开单
type vehicleMaintainReorder int

var VehicleMaintainReorder vehicleMaintainReorder

// 维护完成，继续下一步
func (c *vehicleMaintainReorder) MaintainFinished() int {
	return 1
}

// 提交客服重新开单
func (c *vehicleMaintainReorder) Reorder() int {
	return 2
}

// 继续维护
func (c *vehicleMaintainReorder) ContinueMaintain() int {
	return 3
}

func (c *vehicleMaintainReorder) ToText(value int) string {
	switch value {

	case 1:
		return "维护完成，继续下一步"

	case 2:
		return "提交客服重新开单"

	case 3:
		return "继续维护"

	}
	return ""
}

func (c *vehicleMaintainReorder) ToDict(value int) *dicts.IntDict {
	return &dicts.IntDict{
		Text:  c.ToText(value),
		Value: value,
	}
}

func (c *vehicleMaintainReorder) ToValue(text string) int {
	switch text {

	case "维护完成，继续下一步":
		return 1

	case "提交客服重新开单":
		return 2

	case "继续维护":
		return 3

	}
	return 0
}
